import * as types from '../constants/ActionTypes'

import {message} from 'antd'

import * as Apis from '../apis/test'

export const test = params => {
    console.log("action ", params)
    return (dispatch, getState) => {
        Apis.test(params)
            .then(
                result => {
                    dispatch({
                        type: types.TEST,
                        data: result
                    })
                }
            ).catch(
            error => {
                message.error(error)
            }
        )
    }
}